<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。
	pageContext.setAttribute("basePath",basePath);
%> 

<title>身份证导入</title>
<link rel="stylesheet" type="text/css" href="../../statics/custom/custom.css">
<link rel="stylesheet" type="text/css" href="../../statics/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../statics/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="../../statics/easyui/themes/color.css">
<script src="../../statics/js/jquery/jquery-1.11.1.min.js"></script>
<script src="../../statics/easyui/jquery.easyui.min.js"></script>
<script src="../../statics/easyui/locale/easyui-lang-zh_CN.js"></script>
<script src="../../statics/easyui/datagrid-detailview.js"></script>
<script src="../../statics/easyui/datagrid-filter.js"></script>
<script src="../../statics/custom/custom.js"></script>
<script src="../../statics/custom/easyui.extends.js"></script>
<script src="../../statics/custom/easyui.crudgrid.extends.js"></script>
<script src="../../statics/custom/easyui.dialog.extends.js"></script>
<script src="../../statics/custom/easyui.tabs.extends.js"></script>
<script src="../../statics/custom/pinyin.js"></script>
<script type="text/javascript">
$(function() {
	var $grid = $('#idCade_list');
	var $title = '身份证信息';
	var $baseUrl = '${pageScope.basePath}hrm/idCade';
	$grid.datagrid({
		title : $title + '列表',
		//url : $baseUrl + '/noUsedPage?sort=idNo',
		url : $baseUrl + '/page?sort=idNo&isUsed=false',
		dialog : {
			url : $baseUrl,
			name : $title,
			create : {
				width : 600,
				height : 300,
				url : 'create',
				action : 'save'
			},
			update : {
				width : 800,
				height : 300,
				url : 'update',
				action:'save'
			}
		},
		pagination : true,
		pageSize : 20,

		pageList : [ 20, 50, 100 ],
		columns : [ [{
			field : 'id',
			hidden : true
		}, {
			field : 'idNo',
			width : 160,
			title : '身份证号码'
		}, {
			field : 'name',
			width : 200,
			title : '姓名'
		},{
			field : 'sex',
			width : 200,
			title : '性别'
		},{
			field : 'nation',
			width : 200,
			title : '民族'
			
		},{
			field : 'born',
			width : 200,
			title : '生日'
		},{
			field : 'address',
			width : 200,
			title : '地址'
		},{
			field : 'userLifeB',
			width : 200,
			title : '有效期起'
		},{
			field : 'userLifeE',
			width : 200,
			title : '有效期止'
		},{
			field : 'police',
			width : 200,
			title : '发证机关'
		}] ],
		toolbar : [ $.crudgrid.buttons.create, $.crudgrid.buttons.update, $.crudgrid.buttons.remove,$.crudgrid.buttons.refresh,'-',$.crudgrid.buttons.clearSearch,'-'  ]
	}).datagrid('search.init');
});

</script>
</head>
<body>
	<div id="dialog" class="easyui-dialog" data-options="closed:true"></div>
	<div id="mainLayout" class="easyui-layout hidden" data-options="fit: true">
		<div data-options="region:'north'" style="height: 50px; background: url(../../statics/images/logo.png); padding: 8px;">
			<div style="float: right; padding-top: 20px; color: #FFFFFF">
				<span>当前用户：<sec:authentication property="principal.name"></sec:authentication></span> <a href="logout" style="text-decoration: none; color: #FFFFFF; padding-left: 5px;">注销</a>
			</div>
		</div>
		<div data-options="region:'center'">
		<table id="idCade_list"></table>
		</div>
	</div>

</body>
</html>